﻿namespace 二
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Employee emp = new Employee();
            Console.WriteLine("请输入员工薪资");
            emp.set_salary(Convert.ToDouble(Console.ReadLine()));
            emp.ShowInfo();
        }
    }
    class Employee
    {
        private string name, position,ID;
        private double salary;
        private DateTime hireDate, birthday;
        public Employee()
        {
            name = "张三";
            position = "职员";
            ID = "001";
            salary = 3000;
            hireDate = new DateTime(2000, 1, 1);
            birthday = new DateTime(1990, 1, 1);
        }
        public Employee(string n,string p,string id, double s,DateTime h,DateTime b)
        {
            name = n;
            position = p;ID = id;salary = s;hireDate = h;birthday = b;
        }
        public void ShowInfo()
        {
            Console.WriteLine("姓名：" + name);
            Console.WriteLine("职务：" + position);
            Console.WriteLine("ID：" + ID);
            Console.WriteLine("薪资：" + salary);
            Console.WriteLine("入职日期：" + hireDate);
            Console.WriteLine("出生日期：" + birthday);
        }
        public double get_salary()
        {
            return salary;
        }
        public void set_salary(double s)
        {
            salary = s;
        }
        //剩下的属性的get和set方法省略
    }
}
